<template>
  <a-card :visible="visible">
    <j-form-container :disabled="formDisabled">
      <a-form-model ref="form" :model="model">
        <a-form-model-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="机构编码">
          <a-input style="border:0;" placeholder="" v-model="model.code"/>
        </a-form-model-item>
        <a-form-model-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="机构名称">
          <a-input style="border:0;" placeholder="" v-model="model.name"/>
        </a-form-model-item>
        <a-form-model-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="机构类型">
            <a-radio-group :disabled="true" v-model="model.type" read-only>
              <a-radio value="01">
                公司
              </a-radio>
              <a-radio value="02">
                部门
              </a-radio>
              <a-radio value="03">
                工厂
              </a-radio>
            </a-radio-group>
        </a-form-model-item>
        <a-form-model-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="电话">
          <a-input style="border:0;" placeholder="" v-model="model.tel"/>
        </a-form-model-item>
        <a-form-model-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="地址">
          <a-input style="border:0;" placeholder="" v-model="model.address"/>
        </a-form-model-item>
        <a-form-model-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="备注">
          <a-textarea style="border:0;" placeholder="" v-model="model.remark"/>
        </a-form-model-item>
      </a-form-model>
    </j-form-container>
  </a-card>
</template>
<script>
  export default {
    name: 'MdmFactoryBaseInfo',
    components: {},
    data() {
      return {
        model: {},
        visible: false,
        formDisabled: true,
        labelCol: {
          xs: {span: 24},
          sm: {span: 3}
        },
        wrapperCol: {
          xs: {span: 24},
          sm: {span: 16}
        },
      }
    },
    created() {
    },
    methods: {
      open(record) {
        this.visible = true;
        this.$nextTick(() => {
          this.$refs.form.resetFields()
          this.model = Object.assign({}, record)
        })
      },
    }
  }
</script>
<style scoped>
  @import '~@assets/less/common.less'
</style>